///////////////////////////////////////////////////////////////////////////////
// File:        TcpConnectionOutputStream.hpp
// Author:      671643387@qq.com
// Description:
///////////////////////////////////////////////////////////////////////////////

#ifndef MONKEY_COMMON_TCPCONNECTIONOUTPUTSTREAM_HPP_
#define MONKEY_COMMON_TCPCONNECTIONOUTPUTSTREAM_HPP_

#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif

#include "common/TcpConnectionStream.hpp"

namespace monkey
{
    namespace common
    {
        class TcpConnectionOutputStream : public TcpConnectionStream
        {
        public:
            typedef TcpConnectionOutputStream Self;
        public:
            TcpConnectionOutputStream(TcpConnection& conn);
            virtual ~TcpConnectionOutputStream();

        public:
            int Flush(void);

            unsigned int Write(const char* buf, unsigned int length)
            {
                return TcpConnectionStream::Write(buf, length);
            }
        };
    }
}

#endif /* MONKEY_COMMON_TCPCONNECTIONOUTPUTSTREAM_HPP_ */
